﻿<%@ Page Title="" Language="C#" MasterPageFile="Site.Master" AutoEventWireup="true"
    CodeBehind="Administration.aspx.cs" Inherits="ISS.IR.RRNMS.Web.Administration" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css" />
    <script>
        $(function () {
            $("#tabs").tabs().addClass("ui-tabs-vertical ui-helper-clearfix");
            $("#tabs li").removeClass("ui-corner-top").addClass("ui-corner-left");
        });
    </script>
    <style>
        .ui-tabs-vertical
        {
            width: 55em;
        }
        .ui-tabs-vertical .ui-tabs-nav
        {
            padding: .2em .1em .2em .2em;
            float: right;
            width: 12em;
        }
        .ui-tabs-vertical .ui-tabs-nav li
        {
            clear: left;
            width: 100%;
            border-bottom-width: 1px !important;
            border-left-width: 0 !important;
            margin: 0 -1px .2em 0;
        }
        .ui-tabs-vertical .ui-tabs-nav li a
        {
            display: block;
        }
        .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active
        {
            padding-bottom: 0;
            padding-left: .1em;
            border-left-width: 1px;
            border-left-width: 1px;
        }
        .ui-tabs-vertical .ui-tabs-panel
        {
            padding: 1em;
            float: left;
            width: 40em;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">المستخدمين</a></li>
            <li><a href="#tabs-2">مجموعات الخيارات</a></li>
            <li><a href="#tabs-3">الفترات الزمنية</a></li>
        </ul>
        <div id="tabs-1">
            <table align="center" width="100%">
                <tr>
                    <td width="30%" align="center" valign="top">
                        <asp:UpdatePanel runat="server" ID="upnlUsers">
                            <ContentTemplate>
                                <asp:ListBox runat="server" ID="lstUsers" DataTextField="Value" DataValueField="Guid"
                                    Width="100%" Height="300px" OnSelectedIndexChanged="lstUsers_SelectedIndexChanged"
                                    AutoPostBack="true"></asp:ListBox>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnSaveUser" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnDeleteUser" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnNewUser" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                    <td valign="top">
                        <asp:UpdatePanel runat="server" ID="upnlUserDetails">
                            <ContentTemplate>
                                <asp:Panel runat="server" ID="pnlUserDetails" GroupingText="تفاصيل المستخدم" Width="100%">
                                    <table align="center" width="100%">
                                        <tr>
                                            <td width="30%">
                                                الإسم بالكامل
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtFullName" Width="100%" Style="text-align: center"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="30%">
                                                إسم المستخدم
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtUserName" Width="100%" Style="text-align: center"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="30%">
                                                كلمة السر
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtPassword" Width="100%" Style="text-align: center"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="30%">
                                                تليفون
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtTelephone" Width="100%" Style="text-align: center"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="30%">
                                                محمول
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtMobile" Width="100%" Style="text-align: center"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="30%">
                                                البريد الإليكترونى
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtEmail" Width="100%" Style="text-align: center"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="30%">
                                                دور المستخدم
                                            </td>
                                            <td>
                                                <asp:DropDownList runat="server" ID="ddlUserRoles" Width="100%" DataTextField="Value"
                                                    DataValueField="Id">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="30%">
                                                المدير المباشر
                                            </td>
                                            <td>
                                                <asp:DropDownList runat="server" ID="ddlManagers" Width="100%" DataTextField="Value"
                                                    DataValueField="Guid">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:Panel runat="server" ID="pnlPermissions" GroupingText="صلاحيات المستخدم">
                                                    <asp:CheckBox runat="server" ID="chkHasAccountPerm" Text="اللاجئين" />
                                                    <asp:CheckBox runat="server" ID="chkHasCalendarPerm" Text="المواعيد" />
                                                    <asp:CheckBox runat="server" ID="chkHasSearchPerm" Text="البحث" />
                                                    <asp:CheckBox runat="server" ID="chkIsAdmin" Text="الإدارة" />
                                                </asp:Panel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" align="center">
                                                <asp:LinkButton runat="server" ID="btnSaveUser" Text="حفظ" OnClick="btnSaveUser_Click"></asp:LinkButton>
                                                |
                                                <asp:LinkButton runat="server" ID="btnDeleteUser" Text="مسح" OnClick="btnDeleteUser_Click"></asp:LinkButton>
                                                |
                                                <asp:LinkButton runat="server" ID="btnNewUser" Text="جديد" OnClick="btnNewUser_Click"></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="lstUsers" EventName="SelectedIndexChanged" />
                                <asp:AsyncPostBackTrigger ControlID="btnSaveUser" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnDeleteUser" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnNewUser" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
            </table>
        </div>
        <div id="tabs-2">
            <table>
                <tr>
                    <td width="30%">
                        <asp:ListBox runat="server" ID="lstCategories" DataTextField="Value" DataValueField="Id"
                            Height="300px" Width="100%" OnSelectedIndexChanged="lstCategories_SelectedIndexChanged"
                            AutoPostBack="true"></asp:ListBox>
                    </td>
                    <td width="30%">
                        <asp:UpdatePanel runat="server" ID="upnlCategoryItems">
                            <ContentTemplate>
                                <asp:ListBox runat="server" ID="lstCategoryItems" DataTextField="Value" DataValueField="Id"
                                    Height="300px" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="lstCategoryItems_SelectedIndexChanged">
                                </asp:ListBox>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="lstCategories" EventName="SelectedIndexChanged" />
                                <asp:AsyncPostBackTrigger ControlID="btnSaveLookup" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnNewLookup" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                    <td valign="top">
                        <asp:Panel runat="server" ID="pnlItemDetails" GroupingText="التفاصيل">
                            <table width="100%" align="center">
                                <tr>
                                    <td>
                                        إسم الخيار
                                    </td>
                                    <td>
                                        <asp:UpdatePanel runat="server" ID="upnlItemDetails">
                                            <ContentTemplate>
                                                <asp:TextBox runat="server" ID="txtLookupValue"></asp:TextBox>
                                            </ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="lstCategories" EventName="SelectedIndexChanged" />
                                                <asp:AsyncPostBackTrigger ControlID="lstCategoryItems" EventName="SelectedIndexChanged" />
                                                <asp:AsyncPostBackTrigger ControlID="btnSaveLookup" EventName="Click" />
                                                <asp:AsyncPostBackTrigger ControlID="btnNewLookup" EventName="Click" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:LinkButton runat="server" ID="btnSaveLookup" Text="حفظ" OnClick="btnSaveLookup_Click"></asp:LinkButton>
                                        |
                                        <asp:LinkButton runat="server" ID="btnDeleteLookup" Text="مسح" OnClick="btnDeleteLookup_Click"></asp:LinkButton>
                                        |
                                        <asp:LinkButton runat="server" ID="btnNewLookup" Text="جديد" OnClick="btnNewLookup_Click"></asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
        </div>
        <div id="tabs-3">
            <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td width="30%">
                                <asp:ListBox runat="server" ID="lbSlots" Width="100%" Height="300" AutoPostBack="true"
                                    OnSelectedIndexChanged="lbSlots_SelectedIndexChanged" DataTextField="Value" DataValueField="GUID">
                                </asp:ListBox>
                            </td>
                            <td>
                                <table>
                                    <tr>
                                        <td>
                                            من
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtSlotFromHours"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtSlotFromMinutes"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            إلى
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtSlotToHours"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtSlotToMinutes"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <asp:LinkButton runat="server" ID="btnSaveSlot" Text="حفظ" OnClick="btnSaveSlot_Click"></asp:LinkButton>
                                            |
                                            <asp:LinkButton runat="server" ID="btnDeleteSlot" Text="مسح" OnClick="btnDeleteSlot_Click"></asp:LinkButton>
                                            |
                                            <asp:LinkButton runat="server" ID="btnNewSlot" Text="جديد" OnClick="btnNewSlot_Click"></asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="lbSlots" />
                    <asp:AsyncPostBackTrigger ControlID="btnSaveSlot" />
                    <asp:AsyncPostBackTrigger ControlID="btnNewSlot" />
                    <asp:AsyncPostBackTrigger ControlID="btnDeleteSlot" />
                </Triggers>
            </asp:UpdatePanel>
        </div>
    </div>
</asp:Content>
